//1. 引入Vue
import Vue from 'vue'

//2.引入vue-router
import VueRouter from 'vue-router'

//3.引入路由需要的组件
import SignIn from '@/view/SignIn'
import Register from '@/view/Register'
import List from '@/view/List'
import Article from '@/view/Article'

//4.使用vue-router
Vue.use(VueRouter)

//5.创建vue-router实例
const router = new VueRouter({
  routes: [
    {
      path: '/SignIn',
      component: SignIn,
    },
    {
      path: '/Register',
      component: Register,
    },
    {
      path: '/List',
      component: List,
    },
    {
      path: '/SignIn',
      component: SignIn,
    },
    {
      path: '/Article',
      component: Article,
    },
  ],
})

//6.导出router实例
export default router
